/**
 * 音阶类
 * @author liaosh
 * @date 2022-10-22 21:12
 */
public class Note extends Expression {

    /**
     * 根据解析结果进行执行
     * @param key
     * @param value
     */
    @Override
    public void execute(String key, double value) {
        String note = "";
        switch(key) {
            case "C":
                note = "1";
                break;
            case "D":
                note = "2";
                break;
            case "E":
                note = "3";
                break;
            case "F":
                note = "4";
                break;
            case "G":
                note = "5";
                break;
            case "A":
                note = "6";
                break;
            case "B":
                note = "7";
                break;
            default:
                break;
        }
        System.out.print(note + " ");
    }
}
